SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 49606: Decimals are rounded to seven digits when exporting to XLSX files using the XLSX driver

DetailsAboutRate It

Decimal data in Excel is truncated and rounded to seven digits when you export the data using the XLSX driver with SAS/ACCESS® Interface to PC Files. The following code shows an example:

data bob;
bob=1.345678481;
run;

proc export data=bob
            dbms=xlsx
            outfile='c:\sastest\mydigits.xlsx' replace;
     sheet='fred';
run;

The Excel workbook will contain the digits 1.3456785. The seventh digit is rounded to the next decimal using normal rounding rules. To resolve the problem, do one of the following:

  • Export the file using DBMS=EXCEL or DBMS=EXCELCS.
  • Export the file as a tab-delimited text file or a comma-delimited text file using DBMS=CSV or DBMS=TAB and import the text file into Excel.


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to PC Files64-bit Enabled HP-UX9.3 TS1M29.4 TS1M0
Microsoft Windows Server 20089.3 TS1M2
Microsoft Windows Server 2008 for x649.3 TS1M29.4 TS1M0
Windows 7 Professional 32 bit9.3 TS1M2
Microsoft Windows XP Professional9.3 TS1M2
Windows 7 Enterprise 32 bit9.3 TS1M2
64-bit Enabled AIX9.3 TS1M29.4 TS1M0
Windows 7 Home Premium x649.3 TS1M2
Microsoft Windows Server 2003 for x649.3 TS1M2
Windows 7 Home Premium 32 bit9.3 TS1M2
Windows 7 Enterprise x649.3 TS1M29.4 TS1M0
Microsoft Windows Server 2003 Standard Edition9.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M2
Windows Vista9.3 TS1M2
Windows Vista for x649.3 TS1M2
Windows 7 Ultimate x649.3 TS1M2
Windows 7 Ultimate 32 bit9.3 TS1M2
Windows 7 Professional x649.3 TS1M29.4 TS1M0
Microsoft® Windows® for x649.3 TS1M29.4 TS1M0
64-bit Enabled Solaris9.3 TS1M29.4 TS1M0
HP-UX IPF9.3 TS1M29.4 TS1M0
Linux9.3 TS1M29.4 TS1M0
Linux for x649.3 TS1M29.4 TS1M0
Solaris for x649.3 TS1M29.4 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.